#! /usr/bin/env python
# -*- coding: utf-8 -*-
#

from distutils.core import setup
import sys

args = sys.argv[:]
with_bash_complete = 0
with_bash_complete_path = '/etc/bash_completion.d'

for arg in args:
	if arg.find('--with-bash-complete') == 0:
		with_bash_complete = 1
		s = arg.find('=')
		if s != -1:
			with_bash_complete_path = arg[s + 1:]
		sys.argv.remove(arg)
	elif arg == '--without-bash-complete':
		with_bash_complete = 0
		sys.argv.remove(arg)

data_files = [
	('share/man/man1', ['tag.1']),
]

if with_bash_complete != None:
	data_files.append((with_bash_complete_path, ['tag_bash_complete']))

setup(
	name = 'Tag',
	version = '0.1',
	description = 'User-space file tagging utility',
	author = 'Andrzej Rutkowski',
	author_email = 'andrzej.rutkowski+code@gmail.com',
	url = 'http://code.google.com/p/tag-util/',
	long_description = 
"""This is a handy shell utility for tagging files. It aims as being useful and comfortable while used in composition with other tools.

All tags (also known as labels) are kept in sqlite database in user's home directory, separate from files' content; it is possible to tag any type of file.""",
	scripts = ['tag', 'tagexec'],
	py_modules = ['tagutil'],
	data_files = data_files,
	classifiers=[
		'Development Status :: 2 - Pre-Alpha',
		'Environment :: Console',
		'Intended Audience :: End Users/Desktop',
		'Intended Audience :: System Administrators',
		'License :: OSI Approved :: GNU General Public License (GPL)',
		'Operating System :: POSIX',
		'Operating System :: POSIX :: Linux',
		'Programming Language :: Python',
		'Topic :: Utilities',
	],
)
